package com.world.tg.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("响应数据")
public class BaseResult {
    @ApiModelProperty("状态码")
    private Integer code;
    @ApiModelProperty("消息")
    private String msg;

    public void success(String msg){
        this.code = 200;
        this.msg = msg;
    }

    public void fail(String msg){
        this.code = 0;
        this.msg = msg;
    }
}
